// 封装高级组建 // token 正常调整  无token ->登录

import { getToken } from '@/utils'
import { Navigate } from 'react-router-dom'
export function AuthRouter({ children }) {
  const token = getToken()
  if (token) {
    return <>{children}</>
  }
  else {
    return <Navigate to="/login" replace />
  }
}